package com.zzzs.threaddemo;

/**
 * @author zhu_shuai
 * @since 2021/6/22
 */
public class ThreadDemo {

    public static void main(String[] args) {
        for (int i = 0; i < 10; i++) {
            MyThread myThread = new MyThread(i);
            myThread.start();
        }

    }

}
class MyThread extends Thread {

    private int i;

    public MyThread(int i) {
        this.i = i;
    }

    @Override
    public void run() {
        System.out.println("name: " + i);
    }
}
